﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BOSS.Domain.Security;

namespace BOSS.Dao.Security
{
    /// <summary>
    /// 帐号权限设置 DAO
    /// </summary>
    public interface IAccountPrivilegeSettingDao : IEntityDao<AccountPrivilegeSetting, int>
    {
        /// <summary>
        /// 查询指定用户的所有权限
        /// </summary>
        /// <param name="account"></param>
        /// <returns></returns>
        PrivilegeGroup SelectByAccount(Account account);

        /// <summary>
        /// 为指定帐号添加权限
        /// </summary>
        /// <param name="account"></param>
        /// <param name="privilege"></param>
        /// <returns></returns>
        int Insert(Account account, Privilege privilege);

        /// <summary>
        /// 为指定帐号更新权限
        /// </summary>
        /// <param name="account"></param>
        /// <param name="privilege"></param>
        void Update(Account account, Privilege privilege);

        /// <summary>
        /// 为指定帐号移除权限
        /// </summary>
        /// <param name="account"></param>
        /// <param name="privilege"></param>
        void Delete(Account account, Privilege privilege);
    }
}
